
WHY HAVE DATATYPES?

Each ViSta data object has a datatype. The datatype determines ViSta's default analyses and visualizations, and limits the choice of actions you can take to those that are likely to be reasonable. 

Datatypes are meant to simplify the user's experience... they allow ViSta to make a more educated guess about what should be done with the data, and provide an unobtrusive way of guiding the user by limiting choices. 

To determine the datatype of the current dataobject, type:
  (datatype?)
For more information on the details of datatypeing the current dataobject, type
  (current-datatype)
in the listener.


WHAT ARE THE DATATYPES?

The datatype depends on variable types and on whether the data are frequencies, are relational, or contain missing values (data are frequencies if explicitly declared so in the datacode, or if all numeric variables are named "Freq").

The 12 data types recognized by ViSta are:

CATEGORY - There are only category variables

UNIVARIATE - There is one variable and it is non-frequency numeric

BIVARIATE - There are two variables and they are both non-frequency numeric

MULTIVARIATE - There are more than two variables. All are non-frequency numeric

CLASSIFICATION - There is exactly 1 non-frequency numeric variable and there are 1 or more category variables.

FREQUENCY - All the variables are numeric frequency variables

FREQCLASS - There is exactly 1 numeric frequency variable and there are 1 or more category variables

CROSSTABS - There are 1 or more numeric frequency variables 1 and or more category variables

GENERAL - When none of the above defintions is satisfied the datatype is "general".

MISSING - The data have one or more NIL elements

MATRIX - The observations and variables refer to the same things, the data elements are relational, specifying the relation (correlation, distance, covariance) between pairs of the things.

NEW - Data created by the NEW DATA menu item, and not yet saved as a dataobject.
 

DEFINITION OF DATATYPES:

Somewhat more formally, the datatypes are defined to be:
A) NEW for data which have just be generated by NEW DATA menu item.
B) MISSING if the data contain one or more NIL elements.
C) MATRIX if matrices are present without NIL elements.
D) If none of the above is true, then the datatype is defined according to the number of category and numeric variables in the data, and by whether the data are frequencies or not. Specifically:

Number of|     |               Number of      
Category |freq?|           Numeric Variables
Variables|     |   0          1          2          >2
    0    | nil |  error   univariate bivariate multivariate
         |  t  |  error      freq       freq       freq
   >0    | nil | category    class     general    general
         |  t  | category  freqclass  crosstabs  crosstabs
 NOTES:
 a) TABLE datatype is no longer used.
 b) ORDINAL variables are treated as NUMERIC.
 c) Unless you specify otherwise, by default the datatype is defined on ALL varibles, NOT active variables. This makes the datatype a characteristic of the data, not the active data. 
 d) In addition, datatype may be temporarily set to "EnAbld" "DisAbld" "ReEnAbld".


USEFUL DATATYPE FUNCTIONS AND MESSAGES:

To determine the (generalized) datatype of the current data object, type:  
    (datatype?)
To determine the (generalized) datatype of a data object DOB, type:
    (datatype? DOB)
These functions use the following function which may be used is no data object:
    (datatype  types freq new missing matrix)
where types is a list of variable types, and freq, new, missing, and matrix are logical variables indicating whether the data are frequencies, new, have missing values, or are matrix data.

The full set of possible datatypes, etc, are given by
    (possible-datatypes) 
    (possible-data-extensions) 
    (possible-data-abbreviations)

To see if data satisfy a particular datatype, send a message of the form 
    (send $ :datatype?) 
where "datatype" is replaced by the datatype name for each datatype. E.g.:
    (send $ :freq?)
    (send $ :crosstabs?)
    etc.

For a help message about the datatype aspects of the current dataobject, type
     (current-datatype)
